﻿using System.Web.Mvc;
using Inovout.Services;
using Inovout.Web.Mvc;
using Inovout.YunYao.Models;
using Inovout.YunYao.Services;

namespace Inovout.YunYao.Console.Web.Controllers
{
    [AllowAnonymous]
    public class SolutionController : RepositoryController<Solution>
    {
        [HttpPost]
        public override ActionResult Create(Solution solution)
        {
            RepositoryService.Save(solution);
            return RedirectToAction("Index");
        }
        public ActionResult FlushNginxConfig()
        {
            ISolutionService solutionService = ComponentRegistry.Resolve<ISolutionService>();
            solutionService.FlushNginxConfig();
            return RedirectToAction("index");
        }
    }
}
